#### IAAFT SURROGATES in the Appendix

A <- ggplot(civil.as.op, aes(x=date, y=d)) +
  geom_line() + ggtitle("Data") +  theme_classic() + 
  scale_y_continuous(name=" ", limits=c(-150, 100)) + 
  labs(x = " ", y = " ", color = " ", size=1) +
  theme(plot.title = element_text(size = 16, family = "LM Roman 10"), 
        axis.text=element_text(size=10, family = "LM Roman 10"),
        axis.title=element_text(size=12, family = "LM Roman 10"),
        legend.position="none")

y<-iaaft(civil.as.op$d)
y <- Re(y)

B <- ggplot(data.frame("y"=y,"date"=civil.as.op$date), aes(x=date, y=y)) +
  geom_line(col='skyblue2') + ggtitle("Surrogate 1") +  theme_classic() + 
  scale_y_continuous(name=" ", limits=c(-150, 100)) + 
  labs(x = " ", y = " ", color = " ", size=1) + 
  theme(plot.title = element_text(size = 16, family = "LM Roman 10"), 
        axis.text=element_text(size=10, family = "LM Roman 10"),
        axis.title=element_text(size=12, family = "LM Roman 10"),
        legend.position="none")

y<-iaaft(civil.as.op$d)
y <- Re(y)

C <- ggplot(data.frame("y"=y,"date"=civil.as.op$date), aes(x=date, y=y)) +
  geom_line(col='skyblue2') + ggtitle("Surrogate 2") +  theme_classic() + 
  scale_y_continuous(name=" ", limits=c(-150, 100)) + 
  labs(x = " ", y = " ", color = " ", size=1) + 
  theme(plot.title = element_text(size = 16, family = "LM Roman 10"), 
        axis.text=element_text(size=10, family = "LM Roman 10"),
        axis.title=element_text(size=12, family = "LM Roman 10"),
        legend.position="none")

y<-iaaft(civil.as.op$d)
y <- Re(y)

D <- ggplot(data.frame("y"=y,"date"=civil.as.op$date), aes(x=date, y=y)) +
  geom_line(col='skyblue2') + ggtitle("Surrogate 3") +  theme_classic() + 
  scale_y_continuous(name=" ", limits=c(-150, 100)) + 
  labs(x = " ", y = " ", color = " ", size=1) + 
  theme(plot.title = element_text(size = 16, family = "LM Roman 10"), 
        axis.text=element_text(size=10, family = "LM Roman 10"),
        axis.title=element_text(size=12, family = "LM Roman 10"),
        legend.position="none")

y<-iaaft(civil.as.op$d)
y <- Re(y)

E <- ggplot(data.frame("y"=y,"date"=civil.as.op$date), aes(x=date, y=y)) +
  geom_line(col='skyblue2') + ggtitle("Surrogate 4") +  theme_classic() + 
  scale_y_continuous(name=" ", limits=c(-150, 100)) + 
  labs(x = " ", y = " ", color = " ", size=1) + 
  theme(plot.title = element_text(size = 16, family = "LM Roman 10"), 
        axis.text=element_text(size=10, family = "LM Roman 10"),
        axis.title=element_text(size=12, family = "LM Roman 10"),
        legend.position="none")

y<-iaaft(civil.as.op$d)
y <- Re(y)

G <- ggplot(data.frame("y"=y,"date"=civil.as.op$date), aes(x=date, y=y)) +
  geom_line(col='skyblue2') + ggtitle("Surrogate 5") +  theme_classic() + 
  scale_y_continuous(name=" ", limits=c(-150, 100)) + 
  labs(x = " ", y = " ", color = " ", size=1) + 
  theme(plot.title = element_text(size = 16, family = "LM Roman 10"), 
        axis.text=element_text(size=10, family = "LM Roman 10"),
        axis.title=element_text(size=12, family = "LM Roman 10"),
        legend.position="none")

Six.surrogates <- grid.arrange(A, B, C, D, E, G, ncol=2)

ggsave("Six_surro.pdf", plot = Six.surrogates, 
       device = cairo_pdf, width=9.83, height=9, units = "in")  